<template>
	<view class="container">
		<view class="main-container" v-if="content">
			<view v-html="content" class="con"></view>
		</view>
	</view>
</template>

<script>
	import {
		aboutUs
	} from "@/api/account/account.js"
	export default {
		data() {
			return {
				content: '',
				title: '用户隐私协议'
			}
		},

		created() {
			this.getaboutUs();
		},
		methods: {
			async getaboutUs() {
				const data = await aboutUs()
				// console.log(data, "res")
				if (data.code === 200) {
					for (let i = 0; i < data.data.length; i++) {
						this.content = this.content.concat(data.data[i].content);
					}
				} else if (data.code === 101) {
					this.content = '';
				} else {
					this.$modal.msgError(data.msg);
				}
				//   let _this = this;
				//   _this.$ajax.get('/privacyPolicyApp/auth/getAll/2', {}, true).then(function (data) {
				//     if (data.code === 200) {
				//       for (let i = 0; i < data.data.length; i++) {
				//         _this.content = _this.content.concat(data.data[i].content);
				//       }
				//     } else if (data.code === 101) {
				//       _this.content = '';
				//     } else {
				//       _this.$showToast(data.msg);
				//     }

				//   }, function (err) {
				//     window.console.log(err);
				//   })
				// }
			},
		}
	}
</script>
<style lang="scss" scoped>
	.main-container {
		color: #fff;
		padding: 0 30rpx;
	}
</style>